package org.ermannofranco.genericdaojdbc.user.test;

import org.ermannofranco.genericdaojdbc.user.model.Address;
import org.ermannofranco.genericdaojdbc.user.model.ModelUtils;
import org.ermannofranco.genericdaojdbc.user.model.User;

public class ObjectFactory {

	User[] getRandomUsers(int size) {
		User[] ret = new User[size];
		for (int i = 0; i < size; i++) {
			ret[i] = ModelUtils.getRandomUser();
		}
		return ret;
	}

	User getRandomUser() {
		return getRandomUsers(1)[0];
	}

	Address getRandomAddress() {
		return ModelUtils.getRandomAddress();
	}

	Address[] getRandomAddresses(int size) {
		Address[] ret = new Address[size];
		for (int i = 0; i < size; i++) {
			ret[i] = ModelUtils.getRandomAddress();
		}
		return ret;
	}
}
